#ifndef METHOD_FILTER_H
#define METHOD_FILTER_H
#include "abc_context.h"
#include <memory>
#include <vector>
#include <functional>
#include <numeric>
#include <algorithm>

class MethodFilter
{
public:
    explicit MethodFilter(std::vector<std::shared_ptr<AbcFunc>> &methods);
    MethodFilter &filter(std::function<bool(const std::shared_ptr<AbcFunc> &)> predicate);
    size_t count() const;
    std::vector<std::shared_ptr<AbcFunc>> getCopies() const;

private:
    std::vector<std::shared_ptr<AbcFunc>> &sourceMethods;
    std::vector<size_t> indices;
};

#endif // METHOD_FILTER_H